<#assign menu="user">
<#assign submenu="user_list">
<#include "/system/head.ftl">
<!--main content start-->
<style type="text/css">

</style>
<section id="main-content">
	<section class="wrapper">
		<!-- page start-->
		<form id="update_user_form" class="form-horizontal" action="${basePath}/admin/user/update.json"  autocomplete="off"  method="post"
			enctype="multipart/form-data">
		<div class="row">
			<div class="col-lg-12">
				<section class="panel">
					<header class="panel-heading"> 
						修改会员信息
					</header>
					<div class="panel-body">
					<input type="hidden" name="userEntity.id" value="${userEntity.id?c}" id="goodsId" />
						<div class="form-group">
                          <label class="col-sm-2 col-sm-2 control-label">账户名</label>
                          <div class="col-sm-10">
                              <input type="text" style="font-size:15px;width: 300px;" class="form-control" name="userEntity.userName"
                              	placeholder="账户名" id="userName" value="${userEntity.userName}" >
                              </input>
                          </div>
                        </div>
                        <div class="form-group">
                          <label class="col-sm-2 col-sm-2 control-label">可用金额</label>
                          <div class="col-sm-10">
                              <input type="text" style="font-size:15px;width: 300px;" class="form-control" name="userEntity.userMoney"
                              	placeholder="可用金额" id="userMoney" value="${userEntity.userMoney}" >
                              </input>
                          </div>
                        </div>
                        <div class="form-group">
                          <label class="col-sm-2 col-sm-2 control-label">可用金币</label>
                          <div class="col-sm-10">
                              <input type="text" style="font-size:15px;width: 300px;" class="form-control" name="userEntity.userGold"
                              	placeholder="可用金币" id="userGold" value="${userEntity.userGold}" >
                              </input>
                          </div>
                        </div>
                        <div class="form-group">
                          <label class="col-sm-2 col-sm-2 control-label">冻结金额</label>
                          <div class="col-sm-10">
                              <input type="text" style="font-size:15px;width: 300px;" class="form-control" name="userEntity.frozenMoney"
                              	placeholder="冻结金额" id="frozenMoney" value="${userEntity.frozenMoney}" >
                              </input>
                          </div>
                        </div>
                        <div class="form-group">
                          <label class="col-sm-2 col-sm-2 control-label">会员状态</label>
                          <div class="col-sm-10" style="margin-bottom:10px;">
                          	<input name="userEntity.status" value="1" type="radio" <#if (userEntity.status==1)>checked</#if>> 正常
							<input name="userEntity.status" value="0" type="radio" <#if (userEntity.status==0)>checked</#if>> 禁用
                          </div>
                        </div>
                        
                        <div class="form-group">
                      	  <div class="col-lg-offset-2 col-lg-10">
                          <button class="btn btn-shadow btn-primary" type="submit">修改</button>
                          <button class="btn btn-danger" onclick="javascript:window.history.go(-1);" type="button">返回</button>
                          </div>
                      </div>
					</div>
				</section>
			</div>
		</div>
		</form>
		<!-- page end-->
	</section>
</section>
<!--main content end-->
<script type="text/javascript" charset="utf-8" src="${basePath}/system/assets/uploadify/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" src="${basePath}/system/assets/uploadify/jquery.uploadify.min.js"></script>

<script type="text/javascript">
$(function(){
	$('#update_goods_form').ajaxForm({
		dataType : 'json',
		success : function(data) {
			if (data.result) {
				bootbox.alert("保存成功，将刷新页面", function() {
					window.location.reload();
					
				});
			}else{
				showErrors($('#update_user_form'),data.errors);
			}
		},
		error:function(data,textstatus){
	        bootbox.alert({  
	            buttons: {  
	               ok: {  
	                    label: '关闭'
	               }  
	            },
	            message: data.responseText,
	            title: '<@spring.message "system.errorTip"/>',  
	        });
	     } 
	});
	
});
</script>
<#include "/system/foot.ftl">
